<?php
global $_W, $_GPC;
global $_W, $_GPC;
load()->func('communication');
$dbredirect = $_GPC['dbredirect'];
$settings = $this->module['config'];
if ($settings['switch'] == 0) {
	message('积分商城已关闭！', '', 'error');
}
checkauth();
if (empty($dbredirect)) {
	$loginurl = $this->buildCreditAutoLoginRequest($settings['appkey'], $settings['appsecret'], $_W['member']['uid'], intval($_W['member']['credit1']));
} else {
	$loginurl = $this->buildCreditAutoLoginAndRedirectRequest($settings['appkey'], $settings['appsecret'], $_W['member']['uid'], intval($_W['member']['credit1']), $dbredirect);
}
Header("Location: {$loginurl}");
die;